package cn.itsource.wechat.mapper;

import cn.itsource.org.domain.User;
import cn.itsource.wechat.domain.WxUser;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * 部门mapper
 */
public interface WxUserMapper extends Mapper<WxUser> {

    default WxUser findByOpenId(String openid){
        Example example = new Example(WxUser.class);
        example.and().andEqualTo("openid",openid);
        WxUser wxUser = this.selectOneByExample(example);
        return wxUser;
    }

}
